I know that are posts similar to this but they didn't answer my question ! I have an issue with next.js after a while working with it! Now, I don't know for sure if it's from next.js , I just assume.. It happened on my laptop aswell, I pushed the project on github, cloned it on the pc it magically worked (so it wasn't my fault), now after 3 days of working at the pc the error appeared again. This time I really didn't do anything. The project was working, I commited the last changes, closed the project, after 2 hours came back , open the IDE and I got this error, out of nowhere .
error - ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process t
his file. See https://webpack.js.org/concepts#loaders
> <!doctype html>
| <html>
| <head>
this is my next.config :
const HtmlWebpackPlugin = require('html-webpack-plugin'); //installed via npm
const webpack = require('webpack'); //to access built-in plugins
module.exports = {
module: {
rules: [{ test: /\.txt$/, use: 'raw-loader' }],
},
plugins: [new HtmlWebpackPlugin({ template: './src/index.html' })],
env: {...}
reactStrictMode: false,
webpack5: true,
webpack: (config) => {
config.resolve.fallback = {
fs: false,
child_process: false
};
return config;
}
}
I get this in console too :
Could not find files for / in .next/build-manifest.json
Please help because it's a project a work for a client and I need to send it by the end of this week